package com.rui.study.algorithm.T_类加载的时机_不会引发_父类静态字段间接访问;

import com.rui.study.algorithm.L_深入理解JVM_类加载的时机_不会引发_父类静态字段间接访问.Piter;

/**
 * @program: study
 * @description:
 * @author: Yaowr
 * @create: 2019-02-28 07:49
 **/
public class Dad {
    static int value = 789;

    static int num;

    String name;

    static {
        System.out.println("[Dad]我被初始化了" + Piter._1MB);
        num = 123 + Piter._1MB;
    }


    protected Dad () {
        name = "[Dad]我被初始化了" + num;
    }

    public Dad (String name) {
        this.name = name;
    }

    public void init(int key) {
        num += key;
    }

    {
        String b = "第一块init";
    }

    {
        String  b = "第二块init";
    }
}
